package com.pdsu.xpf.graduation01.service.impl;

import com.pdsu.xpf.graduation01.dao.IAgricultureDao;
import com.pdsu.xpf.graduation01.domain.Agriculture;
import com.pdsu.xpf.graduation01.service.IAgricultureService;
import com.pdsu.xpf.graduation01.vo.AgricultureVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AgricultureServiceImpl implements IAgricultureService {

    @Autowired
    IAgricultureDao iAgricultureDao;

    @Override
    public List<Agriculture> findAllAgriculture() {
        return iAgricultureDao.findAllAgriculture();
    }

    @Override
    public List<Agriculture> findATypeAgriculture(String type) {
        return iAgricultureDao.findATypeAgriculture(type);
    }

    @Override
    public Agriculture findAgricultureByAID(int aid) {
        return iAgricultureDao.findAgricultureByAID(aid);
    }

    @Override
    public List<AgricultureVO> findAllAgricultureVO() {
        return iAgricultureDao.findAllAgricultureVO();
    }

    @Override
    public Integer delAgricultureByAID(int aid) {
        return iAgricultureDao.delAgricultureByAID(aid);
    }
}
